#ifndef HANDLER_H
#define HANDLER_H

#include <QObject>

class handler : public QObject
{
    Q_OBJECT

public:
    static handler * getInstance();
    void addScore();
    void clearScore();

//p28:构造函数由public类型改为private类型，其他人是无法在外界获取到这个程序的实例的
private:
    explicit handler(QObject *parent = nullptr);

    //p28：这里自定义一个信号在signals:中写一个函数名
signals:
    void beatMouse();
    void stopMouse();

public slots:
//p28:
private:
    static handler *hand;
};

#endif // HANDLER_H
